<script setup lang="ts">

const props = defineProps({
  count: {
    type: Number,
    required: true
  },
  src:{
    type: String,
    required:true
  }
})
const displayValue = computed(() => {
  if (props.count >= 100000) {
    return (props.count / 10000).toFixed(1) + '万'
  } else {
    return props.count ? props.count : 0
  }
})
</script>
<template>
  <div class="content">
    <img :src="props.src" alt="" class="img">
    <span class="text">{{ displayValue }}</span>
  </div>
</template>
<style scoped lang="scss">
.content {
  display: flex;
  justify-content: center;
  align-items: center;

  .img {
    width: 2em;
    border-radius: 50%;
  }

  .text {

  }
}
</style>